Timers are used in a wide variety of situations in data processing systems. For example, timers can be utilized to provide accurate time measurement for one-time events or for recurring events. One-time event timers provide a single time out for a particular purpose. For example, a one-time event timer can be initiated when a user is prompted by an application to provide an input to a processing system. If the input has not been received before the timer times out, a default input can be provided in place of the user supplied input, or another event can be initiated. A sequence of timers for a common event, where each timer is similar to a one-time event timer, can constitute what is referred to as a watchdog timer. During normal operation, a watchdog timer is not expected to time out. Instead, a watchdog timer is expected to be periodically reset by the processing system, before timing out, each time an expected event occurs. Thus, the expected recurring event is monitored to make sure it occurs, and if there is a problem with the recurring event the watchdog timer will expire, and provide a time out indication to notify the processing system. A periodic series of event timers can be used in association with periodically recurring events of the processing system, such as a time base that is used to update the illustrated time of a computer monitor every second.
The number of timers used by applications being handled by a data processor can be much larger than the number of hardware timers implemented at the data processor. For example, in the context of digital networking, timers can be used to manage thousands or millions of parallel network traffic flows. As such, processing systems often include timer software that interfaces with one or more of the hardware timers to implement a linked list of timer, also referred to as software timers, where each timer is represented by an entry in the linked list that is linked to other timer entries in a time-ranked order, e.g., from the soonest to expire timer to the last to expire timer. The creation of a new timer involves determining a system expiration time for the new timer, traversing the linked list to find where the new timer is to be placed in the linked list, and then inserting the new timer into the linked list. By having software comparing the top entry, e.g., the next timer to expire, to a counter, or by loading the next to expire timer into a hardware timer, a large number of timers can effectively be implemented. In this way, a larger number of timers can be implemented than the available number of hardware counters. However, in certain applications, such as large scale virtualization applications, timer software can be tasked with implementing and managing tens of millions of timers, and such a large linked list can require a significant amount of processing system. Moreover, the strict partitioning of resources in a highly virtualized processing system may necessitate that the timer software manages the partitioning of the timers for each different virtual environment, which further increases the demand for processing resources that are dedicated to timer management. Therefore there remains a need for more efficient timer management in a processing system.
Elements in the figures are illustrated for simplicity and clarity and have not necessarily been drawn to scale. In the figures, elements which correspond to elements already described may have the same reference numerals.